<%@ page 
	language="java" 
	contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
    import="java.util.*,java.sql.*" 
%>
<%
	//将数据存储到 request中
	request.setAttribute("msg", "Hello World!");
	request.setAttribute("price", 1234.0);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>利用request共享/传送数据</h1>
	<%
		//接收request传递/共享的数据
		String s = (String)request.getAttribute("msg");
		Double d = (Double)request.getAttribute("price");
		//删除request中共享的数据
		request.removeAttribute("msg");
		request.removeAttribute("price");
	%>
	<p>msg:<%=s%> price:<%=d%></p>
</body>
</html>





